import pandas as pd
import numpy as np

a = pd.Series(np.arange(1000), index=pd.date_range('2020-01-01', periods=1000))

# print(a)
# print(a.index)
# print(a["2021-05-05"])
# print(a["2021-05"])
# print(a["2022"])
# print(a["2021": '2022-01-01'])

print(a.resample('W').sum())
print(a.resample('ME').sum())
print(a.resample('ME').mean())
